package com.gpframework.common.constant;

/**
 * @author mahb
 * @since Jun 2, 2014
 */
public class WeiXinConstants {

    public static final String APP_ID = "wx819630a1fe8a51fb";
    public static final String APP_SECRET = "1baa06667f142025f38703475aa20b28";
    public static final String MCH_ID = "1500584891";
    public static final String MCH_KEY = "AahIlGDHaRV0GYqW4I2EXCVyEBpRotoF";
    public static final String KEY_PATH = "https://gf.yoo-life.com/pay/apiclient_cert.p12";

    //OAuth2.0网页授权功能的回调域名
    public static final String WX_HOST_URL = "medical.cn.cn";

    //OAuth2.0网页授权功能的回调域名
    public static final String WX_HOST_URL_TEST = "192.168.0.106:8080";
    /**
     * 企业号id,key
     */
    public static final String ETOKEN = "1a94HPMthX8QT946zVCq8CsghaHo6meK";// 这个Token是随机生成，但是必须跟企业号上的相同
    public static final String ECORPID = "wxa54ee91f8f27ae0d";// 这里是你企业号的CorpID
    public static final String EENCODINGAESKEY = "qVFeDsQGT6Mgzbl3Q77QBWXdLLa2Q49NOch10jFWQyi";// 这个EncodingAESKey是随机生成，但是必须跟企业号上的相同

    // 获取access_token的接口地址（GET） 限200（次/天）
    public static final String ACCESS_TOKEN_URL = "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=APPID&secret=APPSECRET";
    // 菜单创建（POST） 限100（次/天）
    public static final String MENU_CREATE_URL = "https://api.weixin.qq.com/cgi-bin/menu/create?access_token=ACCESS_TOKEN";
    public static final String MENU_GET_URL = "https://api.weixin.qq.com/cgi-bin/menu/get?access_token=ACCESS_TOKEN";
    public static final String MENU_DELETE_URL = "https://api.weixin.qq.com/cgi-bin/menu/delete?access_token=ACCESS_TOKEN";
    // 发送客服消息
    public static final String SEND_MSG_TO_USER_URL = "https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token=ACCESS_TOKEN";
    // 获取用户基本信息
    public final static String GET_USER_INFO_URL = "https://api.weixin.qq.com/sns/userinfo?access_token=ACCESS_TOKEN&openid=OPENID&lang=zh_CN";

    // 获取用户uID
    public final static String GET_UNIONID_URL = "https://api.weixin.qq.com/cgi-bin/user/info?access_token=ACCESS_TOKEN&openid=OPENID&lang=zh_CN";

    public static final String ACCESS_OAUTH3_URL = "https://api.weixin.qq.com/sns/jscode2session?appid=APPID&secret=APPSECRET&js_code=JSCODE&grant_type=authorization_code";

    //模板信息发送-公众号
    public static final String COMMON_TEMPLATE_SEND_URL = "https://api.weixin.qq.com/cgi-bin/message/template/send?access_token=";
    /**
     * 小程序服务通知url
     */
    public static final String COMMON_SUBSCRIBE_SEND_URL = "https://api.weixin.qq.com/cgi-bin/message/subscribe/send?access_token=";

    /**
     * 公众模版消息url
     */
    public static final String ADVANCED_SUBSCRIBE_SEND_URL = "https://api.weixin.qq.com/cgi-bin/message/template/send?access_token=";

    // 微信内容安全检测接口(POST)
    public final static String MSG_SEC_CHECK_URL = "https://api.weixin.qq.com/wxa/msg_sec_check?access_token=ACCESS_TOKEN";

    /**
     * 微信公众号登录URL
     * https://developers.weixin.qq.com/doc/offiaccount/OA_Web_Apps/Wechat_webpage_authorization.html
     */
    public final static String WX_ADVANCED_URL = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=%s&redirect_uri=%s&response_type=code&scope=snsapi_base&state=1&connect_redirect=1#wechat_redirect";

    /**
     * 公众号获取用户openId
     * https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/login/auth.code2Session.html#%E8%AF%B7%E6%B1%82%E5%8F%82%E6%95%B0
     */
    public static final String ACCESS_OAUTH2_URL = "https://api.weixin.qq.com/sns/oauth2/access_token?appid=%s&secret=%s&code=%s&grant_type=authorization_code";
}
